package com.gem.talkbase.activity;

import java.util.List;
import net.tsz.afinal.FinalBitmap;
import com.gem.talkbase.R;
import com.gem.talkbase.bean.Firend;
import com.gem.talkbase.client.Client;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

/**
 *
 */
public class SerchmanActivity extends Activity  implements OnClickListener{
    TextView unick,ph2,xb2,qm2;
    ImageView iV_imageView,left_btn_3;
	String requestPath=Client.Firend_info_URL;
	List<Firend> list;
	String u_name,u_nick,u_xb,u_stytle,u_image;
	FinalBitmap fb ;
	Button addButton;

	Context context; 
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);	
		setContentView(R.layout.serchman_info);
		init();
		Intent intent = getIntent();
		u_name = intent.getStringExtra("u_name");//用户电话
		u_nick = intent.getStringExtra("u_nick");//用户昵称
		u_xb = intent.getStringExtra("u_xb");//用户性别
		u_stytle = intent.getStringExtra("u_stytle");//用户签名
		u_image = intent.getStringExtra("u_image");//用户头像
		System.out.println(u_name+"====="+u_nick+"====="+u_xb+"====="+u_stytle+"====="+u_image);
		fb = FinalBitmap.create(context);
		unick.setText(u_nick);
		ph2.setText(u_name);
		xb2.setText(u_xb);
		qm2.setText(u_stytle);
		fb.display(iV_imageView,u_image);  
	 }
	
	public void init(){
	 unick=(TextView)findViewById(R.id.lxr_nick_1);
	 ph2=(TextView)findViewById(R.id.lxr_ph3);  
	 xb2=(TextView)findViewById(R.id.lxr_xb22);
	 qm2=(TextView)findViewById(R.id.lxr_qm22);
	 iV_imageView=(ImageView)findViewById(R.id.lxr_iv_1);
	 addButton=(Button) findViewById(R.id.send_bt_3);
	 addButton.setOnClickListener(this);
	 left_btn_3=(ImageView) findViewById(R.id.left_btn_4);
	 left_btn_3.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.left_btn_4:
		     finish();//点击返回按钮
			break;
		case R.id.send_bt_3:
			Intent intent =new Intent(SerchmanActivity.this,Friend_infoActivity.class);
			intent.putExtra("yh_unick", u_nick);//这是好友头像
			startActivity(intent);
			finish();
			break;
	   }
    }	
}
